import { Context, Next } from 'koa';
export default class R {
  static successResult (data?: any, message?: string) {
    return {
      data: data || null,
      code: 200,
      message: message || '成功'
    }
  }

  static failResult (code?: number, data?: any, message?: string) {
    return {
      data: data || null,
      code: code || 500,
      message: message || '成功'
    }
  }
}